<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
   <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Home Page</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function logout(){
		document.getElementById("logoutForm").submit();	
	}
	function loadFavouries() {
		document.getElementById("loadFavouries").submit();
	}
</script>
</head>
<body>
 <form id="logoutForm" action="UserServlet" method="post">
 	<input type="hidden" name="action" value="logout"/>
 </form>
 <form id="loadFavouries" action="UserServlet" method="post">
 	<input type="hidden" name="action" value="loadFavouries"/>
 </form>

<jsp:include page="top-nav-bar.jsp"/>
<div class="container">
  <div class="header">
  	<img class="header-image" src="img/header-image.png" alt="Cherry" name="header_image" id="header_image"/>
  </div><!-- end .header -->
  
  <div class="main-navigation">
  	<c:import url="WEB-INF/xml/diet.xml" var="xmlDietDoc"/>
	<c:import url="style-sheet/diet.xsl" var="xslDietDoc"/>
	<x:transform xml="${xmlDietDoc}" xslt="${xslDietDoc}"/>
	
  	<c:import url="WEB-INF/xml/recipe.xml" var="xmlRecipeDoc"/>
	<c:import url="style-sheet/recipe.xsl" var="xslRecipeDoc"/>
	<x:transform xml="${xmlRecipeDoc}" xslt="${xslRecipeDoc}"/>			
  </div>
  <div class="menu-category"><h3>Random healthy plans</h3></div>
  
  <div class="menu-container">
	<c:import url="WEB-INF/xml/menu.xml" var="xmlMenuDoc"/>
	<c:import url="style-sheet/menu.xsl" var="xslMenuDoc"/>
	<x:transform xml="${xmlMenuDoc}" xslt="${xslMenuDoc}"/>		 	
  </div>
  
  <div class="footer">
  	<img src="img/fptuniversity.png"/>
    <span style="position:absolute">FPT University</span>
  </div>
</div>

</body>
</html>